

# 2682. 找出转圈游戏输家

def circularGameLosers(n, k):
    nums = [0] * (n)
    nums[0] = 1
    current = 0
    count = 1
    while True:
        current = (current + count * k) % n
        nums[current] = nums[current] + 1
        if nums[current] == 2:
            break
        count = count + 1
    result = []
    for i in range(0, n):
        if nums[i] == 0:
            result.append(i + 1)
    return result

if __name__ == "__main__":
    n = 6
    k = 1
    print(circularGameLosers(n,k))